{% extends "base.html" %}

{% block stylesheet %}
    <style type="text/css">
    .content ul.answer {
        margin-left: 40px;
    }
    strong.kw {
        background-color: #3FA8C4;
        color: white;
    }
    </style>
{% endblock %}

{% block note %}
            <p>这里是疑问条目搜索结果，你输入的搜索关键字是【{{ kw }}】，提问时间越晚的条目越靠上。</p>
{% endblock %}

{% block header_extra %}{% endblock %}

{% block main %}
            <div class="column-4-unit">
                <div class="list qna">
                <h2>提及【{{ kw }}】的疑问</h2>
                <div class="content">
                    <p>总共找到 {{ rcount }} 条结果。</p>
                    <p id="kw" style="display: none;">{{ kw }}</p>
                    <ul>
                    {% load short %}
                    {% load context %}
                    {% for q in qs %}
                    <li>
                        <h3><a href="/view/{{ q.id }}/"><span class="who">{{ q.writername }} 问：</span><span class="what">{{ q.title }} <span class="id">#{{ q.id }}</span></span></a></h3>
                        <p><a href="/view/{{ q.id }}/">{{ q.content|context:kw }}</a></p>
                        <ul class="answer">
                            {% for a in q.anss %}
                            <li>
                                <p><span class="who">{{ a.writer }} 答：</span>{{ a.content|context:kw }}</p>
                            </li>
                            {% endfor %}
                        </ul>
                    </li>
                    {% endfor %}
                    </ul>
                </div>
                </div>
            </div>
{% endblock %}
